import VuiElement from '@/components/vui/base/element';

/**
 * 下拉菜单选项
 */
export default class VuiDropdownItemContainer extends VuiElement {
  constructor(id, title, child) {
    super();
    this._className = {
      container: 'vui-dropdown-item-container'
    };
    this._config = { id, title, child };
  }

  initUI() {
    this.initContainer();
    const config = this._config;
    this.setAttribute('value', config.id);
    this.setAttribute('text', config.title);
    this.append(config.child);
  }
}
